"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const typeorm_1 = require("typeorm");
const path_1 = __importDefault(require("path"));
const connection = typeorm_1.createConnection({
    type: "postgres",
    host: "localhost",
    port: 5432,
    username: "postgres",
    password: "postgres",
    database: "demo",
    entities: [
        path_1.default.resolve(__dirname, "./*.js"),
        // "../entity/**/*.ts",
        // "../entity/**/*.js",
    ],
    synchronize: true,
    logging: false,
    entityPrefix: "",
})
    .then((connection) => {
    // here you can start to work with your entities
    // baas = connection;
    console.info("typeorm connected");
    // connection.query('select current_date').then(console.log);
})
    .catch((error) => {
    console.error(error);
    console.error("typeorm error");
    // console.log(error)
});
